import request from '@/utils/request'

// 查询居委会列表
export function listCommittee(query) {
  return request({
    url: '/house/committee/list',
    method: 'get',
    params: query
  })
}

// 查询居委会选项列表
export function listCommitteeOptions(query) {
  return request({
    url: '/house/committee/list',
    method: 'get',
    params: query
  })
}

// 查询居委会详细
export function getCommittee(committeeId) {
  return request({
    url: '/house/committee/' + committeeId,
    method: 'get'
  })
}

// 新增居委会
export function addCommittee(data) {
  return request({
    url: '/house/committee',
    method: 'post',
    data: data
  })
}

// 修改居委会
export function updateCommittee(data) {
  return request({
    url: '/house/committee',
    method: 'put',
    data: data
  })
}

// 删除居委会
export function delCommittee(committeeId) {
  return request({
    url: '/house/committee/' + committeeId,
    method: 'delete'
  })
} 